//
//  UIViewController+CXAddition.m
//  

#import "UIViewController+CXAddition.h"

@implementation UIViewController (CXAddition)

- (void) cx_addChildViewController:(UIViewController *)childVc intoView:(UIView *)toView {
    // 1. 添加子控制器
    [self addChildViewController:childVc];
    // 2. 添加子控制器的视图
    [toView addSubview:childVc.view];
    // 3. 完成添加
    [childVc didMoveToParentViewController:self];
}


@end
